<!--{= include ic/admin-header.html }-->

<div class="am-cf admin-main">
  <!--{= include ic/admin-sidebar.html }-->

  <!-- content start -->
  <div class="admin-content">

    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">模板</strong> / <small>Templet - <!--{= type }--></small></div>
    </div>

    <div class="am-g">
      <div class="am-u-sm-12 am-u-md-6">
        <div class="am-btn-toolbar">
          <div class="am-btn-group am-btn-group-xs">
            <button type="button" class="am-btn am-btn-default"  onclick="gotoUrl('edit?type=<!--{= type }-->')"><span class="am-icon-plus"></span> 新增</button>
            <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
          </div>
        </div>
      </div>
      <div class="am-u-sm-12 am-u-md-3">
        <div class="am-input-group am-input-group-sm">
          <input type="text" class="am-form-field">
          <span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="button">搜索</button>
          </span>
        </div>
      </div>
    </div>

    <div class="am-g">
      <div class="am-u-sm-12">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
                <th class="table-check"><input type="checkbox" /></th><th class="table-cacheName">模板标识</th><th class="table-title">模板名</th><!--{ if(type=="html"){ }--> <th class="table-isForInclude am-hide-sm-only">是否模块</th><!--{ } }--><th class="table-date am-hide-sm-only">创建日期</th><th class="table-set">操作</th>
              </tr>
          </thead>
          <tbody>
          	<!--{ for(var i=0;i<pager.pagesize;i++){ }-->
                <!--{ if(i<results.length){ }-->
                <tr>
                  <td><input type="checkbox" /></td>
                  <td><!--{= results[i].get('cacheName') }--></td>
                  <td><a href="edit?id=<!--{= results[i].id }-->"><!--{= results[i].get("name") }--></a></td>
				  <!--{ if(type=="html"){ }-->
				  <td class="am-hide-sm-only"><!--{ if(results[i].get("isForInclude")){ }--><font>是</font><!--{ }else{ }--><font>否</font><!--{ } }--></td>
				  <!--{ } }-->
                  <td class="am-hide-sm-only"><!--{= moment(results[i].createdAt).zone(-8).format('YYYY年MM月DD日 HH:mm:ss') }--></td>
                  <td>
                    <div class="am-btn-toolbar">
                      <div class="am-btn-group am-btn-group-xs">
                        <div class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="gotoUrl('edit?id=<!--{= results[i].id }-->')"><span class="am-icon-pencil-square-o"></span> 编辑</div>
                        <div class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" onclick="deleteOne('<!--{= results[i].id }-->')"><span class="am-icon-trash-o"></span> 删除</div>
                      </div>
                    </div>
                  </td>
                </tr>
                <!--{ }else{ }-->
                <tr>
                  <td colspan="7">&nbsp;</td>
                </tr>
                <!--{ } }-->
            <!--{ } }-->
          </tbody>
        </table>
        <hr />
		<div class="am-cf">
		  共 <!--{= pager.total }--> 条记录
		  <div class="am-fr">
			<ul class="am-pagination">
			  <li <!--{ if(pager.firstPage==pager.currentPage){ }-->class="am-disabled"<!--{ } }-->><a href="list?page=<!--{= pager.firstPage }-->&pagesize=<!--{= pager.pagesize }-->&type=<!--{= type }-->">«</a></li>
			  <!--{ for(var i=0;i<pager.pageArray.length;i++){ }-->
				  <!--{ if(pager.pageArray[i]==pager.currentPage){ }-->
				  <li class="am-active"><a href="javascript:void(0)"><!--{= pager.pageArray[i] }--></a></li>
				  <!--{ }else{ }-->
				  <li><a href="list?page=<!--{= pager.pageArray[i] }-->&pagesize=<!--{= pager.pagesize }-->&type=<!--{= type }-->"><!--{= pager.pageArray[i] }--></a></li>
				  <!--{ } }-->
			  <!--{ } }-->
			  <li <!--{ if(pager.lastPage==pager.currentPage){ }-->class="am-disabled"<!--{ } }-->><a href="list?page=<!--{= pager.lastPage }-->&pagesize=<!--{= pager.pagesize }-->&type=<!--{= type }-->">»</a></li>
			</ul>
		  </div>
		</div>
		<hr />
        <p></p>
      </div>

    </div>
  </div>
  <!-- content end -->
</div>
<a class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
<style>
#vld-tooltip {position:absolute;z-index: 1200;padding: 5px 10px;background: #F37B1D;min-width: 150px;color: #fff;transition: all 0.15s;box-shadow: 0 0 5px rgba(0,0,0,.15);display: none;}
#vld-tooltip:before {position: absolute;top: -8px;left: 50%;width: 0;height: 0;margin-left: -8px;content: "";border-width: 0 8px 8px;border-color: transparent transparent #F37B1D;border-style: none inset solid;}
</style>
<!--{= include ic/admin-footer.html }-->
<script type="text/javascript">
$(function(){
	$("#collapse-templet").addClass("am-in");
});
</script>